package com.defect.service.statisticsService.statisticsServiceImpl;

import com.defect.mapper.TypeMapper;
import com.defect.po.Type;
import com.defect.service.statisticsService.STypeService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.Date;
import java.util.List;

@Service
public class STypeServiceImpl implements STypeService {
    @Resource
    private TypeMapper typeMapper;

    /**
     * 带条件查询每一种缺陷有多少条数据
     * @param id 项目id
     * @param date1 开始时间
     * @param date2 最后时间
     * @return 返回集合,count1属性为数据条数，TypeDesc为缺陷类型名称
     * @throws Exception
     */
    @Override
    public List<Type> selectTypeCount(int id, Date date1, Date date2) throws Exception {
        return typeMapper.selecetTypeCount(id,date1,date2);
    }
}
